home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’91 / MacsBugTool / Read me < prev   
Encoding:
Text File  |  1991-06-21  |  2.0 KB  |  49 lines  |  [TEXT/MPS ]

  1. Macsbug : run a macsbug command in the MPW Shell.
  2.  
  3. Use "Macsbug command" to run a macsbug command into a shell window,
  4. like this:
  5.  
  6. macsbug ht
  7.  Totaling the Application heap at 0051114C
  8.                                  Total Blocks    Total of Block Sizes
  9.   Free                           0006      #6    001A00BC    #1704124
  10.   Nonrelocatable                 003D     #61    00004E38      #20024
  11.   Relocatable                    0178    #376    000475F8     #292344
  12.     Locked                       000A     #10    000210A8     #135336
  13.     Purgeable and not locked     0015     #21    0001E96C     #125292
  14.   Heap size                      01BB    #443    001EC4EC    #2016492
  15.  
  16. macsbug dm 0 30
  17.  Displaying memory from 0
  18.   00000000  4081 0000 4081 0000  0079 960C 000C 0314  @•••@••••y••••••
  19.   00000010  000C 0316 000C 0318  4080 26F8 4080 26FA  ••••••••@•&•@•&•
  20.   00000020  4080 26FC 4080 26FE  4080 99B0 4080 2702  @•&•@•&•@•••@•'•
  21.  
  22. macsbug hd f
  23.  Displaying the Application heap at 0051114C
  24.      Start    Length      Tag  Mstr Ptr Lock Prg  Type   ID   File      Name
  25.     005323B4 00000004+00   F
  26.     005326B0 00000008+00   F
  27.     00533BA4 0000000C+00   F
  28.     00533DB8 00000160+00   F
  29.     00544BC0 00000144+00   F
  30.     00544D0C 00001328+00   F
  31.     0054603C 000002F8+00   F
  32.     0055D0B0 0019E474+00   F
  33.   #8 blocks listed, which use #1703312 bytes, storing #1703248 bytes
  34.   There are #1828604 free or purgeable bytes in this heap
  35.  
  36. The macsbug script hands the command off to macsbugtool, which concatenates
  37. it into a string it passes through DebugStr().  The output is collected
  38. in MacsBug's log file, which is then dumped into the window, with a little
  39. editing.
  40.  
  41. If the output of a command takes more than one screen, you may have to press
  42. the spacebar a few times to prod MacsBug along.
  43.  
  44. This whole scheme is rather fragile; treat it kindly.  In particular, avoid
  45. "macsbug g," which confuses MacsBug.
  46.  
  47. The tool and script were written by Tom Lippincott (lippin@math.berkeley.edu)
  48. with help from Robert Herrell.  Share and Enjoy!
  49.